package com.apartment.own.domain.enums;

import com.baomidou.mybatisplus.annotation.IEnum;

import java.io.Serializable;

/**
 * @author sxy
 * @version 1.0
 * @date 2020/9/3 0003 下午 2:38
 */
public enum PaymentTimeTypeEnum implements IEnum {
    BeforeTheBillStarts(1, "账单开始前提前",0),
    FixTheBillWhenItStarts(2, "账单开始后固定",0),
    FixTheBillBeforeStart(3,"账单开始前固定",0),
    TheBillIsFixedOneMonthBeforeItStarts(4,"账单开始前一个月固定",0)
    ;
    private Integer id;
    private String name;
    private Integer select;
    PaymentTimeTypeEnum(Integer id, String name,Integer select) {
        this.id = id;
        this.name = name;
        this.select=select;
    }

    public static PaymentTimeTypeEnum getEnum(int id ) {
            for (PaymentTimeTypeEnum enums : PaymentTimeTypeEnum.values()) {
                if (enums.getValue().equals(id) ) {
                    return enums;
                }
            }
            return null;
        }    
    
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSelect() {
        return select;
    }

    public void setSelect(Integer select) {
        this.select = select;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public Serializable getValue() {
        return this.id;
    }
}
